package com.study.manage.dal;

import java.util.List;

import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;

import com.study.manage.domain.BlogCommentMedia;
import com.study.manage.domain.Media;


public interface BlogCommentMediaRepository
        extends PagingAndSortingRepository<BlogCommentMedia, Long> {

    @Query("select m from BlogCommentMedia t, Media m where t.mediaId=m.id and t.blogCommentId=:blogCommentId and t.state=0")
    List<Media> findByBlogCommentId(@Param("blogCommentId") Long blogCommentId);



}
